<template>
    <div id="btnsBox">
        <button type="text" size="small" v-if="getButtonConfig&&getButtonConfig.edit" @click="edit">编辑</button>
        <button type="text" size="small" v-if="getButtonConfig&&getButtonConfig.check" @click="checkHistory">历史版本</button>
    </div>
</template>
<script>
export default {
  props: ['scope'],
  data () {
    return {

    }
  },
  computed: {
    getButtonConfig () {
      return this.$store.getters.getButtonConfig('versionManagement')
    }
  },
  methods: {
    edit () {
      this.$emit('edit', this.scope.row.id)
    },
    checkHistory () {
      this.$router.push({name: 'versionHistory', query: {channel: this.scope.row.channel, phoneType: this.scope.row.phoneType}});
    }
  }
}
</script>
<style lang="less" scoped>
    #btnsBox{
        text-align: left;
        button{
            background-color: transparent;
            color:#63c5ce;
            font-size: 14px;
            padding:0 10px;
            border-right: 1px solid #63c5ce;
            border-radius:0; 
            cursor: pointer;
            &:last-child{
                border:none;
            }
            &:disabled{
                color:#bbb;
                cursor:not-allowed;
            }
        }
        .fontColorGary{
            color: #bbb;
        }
    }
</style>


